<?php
namespace  App\Http\Models;

use Illuminate\Database\Eloquent\Model;


class CategoryModel extends Model
{
    protected $table = 'category';
    public $timestamps = false;
    protected $guarded = [''];
    //protected $fillable=['字段1','字段2'];
    public function show_category_name($category_id){
        $Category=  CategoryModel::where(['id'=>$category_id])->first()->toArray();

        return  $Category['name'];
    }


}
